<?php

/**
* @Project Travel
* @Author Le Ngoc Tu (info@dulichdanang.com.vn)
* @Copyright (C) 2010 Da nang Travel. All rights reserved
* @Createdate 01/09/2010 10:10
*/

$content = '';

$sql = "SELECT `albumid`,`name`,`path_img`,`num_photo`,`num_view`, `alias` FROM `" . NV_PREFIXLANG . "_albums_album` ORDER BY `weight` ASC LIMIT 4";
if ( ( $result = $db->sql_query( $sql ) ) != false )
{	
		$content .= '<div class="block_album">';

	while ( list( $albumid, $name, $path_img, $num_photo, $num_view, $alias ) = $db->sql_fetchrow( $result ) )
	{	
		$url_img = NV_BASE_SITEURL . NV_UPLOADS_DIR . "/albums/" . $path_img;
		$url_link = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=albums&amp;" . NV_OP_VARIABLE . "=view/" . $albumid . "/" .$alias;
		$link = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=albums";

		$content .= '<div class="items" style="width:250px; float: left; margin-top:10px;">';
		$content .= '&nbsp;<a href="'.$url_link.'"><img src="' . $url_img . '" alt="" title="' . $name . '" class="img" width = 208 height = 150 /></a><br/>';
		$content .= '<a href="'.$url_link.'" title="' . $name . '"><strong>' . $name . '</strong></a>&nbsp;';
		$content .= '<span style="font-size: 11px; color: rgb(153, 153, 153); font-weight: normal;">' .$num_photo. ' photos | ' . $num_view . ' view</span>';
		$content .= '</div>';
		
	}   $content .= '<div style="clear:both"></div>';
		$content .= '<div class="alllink" style="padding-right: 10px">';
		$content .= '<a href="'.$link.'"> Xem tất cả</a>';
		$content .= '</div>';
        $content .= '<div style="clear:both"></div>';
		$content .= '</div>';
}

?>
